# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=faad2
pkgver=2.10.0
pkgrel=1
pkgdesc="ISO AAC audio decoder"
arch=('x86_64')
url="https://github.com/knik0/faad2"
license=('GPL2')
depends=('glibc')
provides=('faad' 'libfaad_drm.so' 'libfaad.so')
source=($pkgname-$pkgver.tar.gz::https://github.com/knik0/faad2/archive/${pkgver//./_}.tar.gz)
sha512sums=('92c8b5e79f85b7a7caac9e7954959c26d74ef148a658dcb37e2c1b303fc2fcc5a0d12f21e7bd476870498109bdd03916a56c13f578186a69d6eceb103222e771')
b2sums=('73ecbcbb3fce93e8ceb88f6f7669bb681d2329935018cc2a23929cf6672959a0678b47c830cfdcf8e716709ce5252a02178737a7af09de373f7c8b54f38f3d9d')

prepare() {
  mv -v "${pkgname}-${pkgver//./_}" "${pkgname}-${pkgver}"
  cd "${pkgname}-${pkgver}"
  autoreconf -vfi
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -vDm 644 {AUTHORS,ChangeLog,NEWS,README*,TODO} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
}
